---
title: oras discover
sidebar_position: 60
warning: Do NOT modify this generated file
---

# oras discover

[Preview] Discover referrers of a manifest in a registry or an OCI image layout
** This command is in preview and under development. **

```bash
oras discover [flags] <name>{:<tag>|@<digest>}
```

## Examples

Discover referrers of manifest 'hello:v1' in registry 'localhost:5000', displayed in a tree view:

```bash
oras discover localhost:5000/hello:v1
```

Discover referrers via referrers API:

```bash
oras discover --distribution-spec v1.1-referrers-api localhost:5000/hello:v1
```

Discover referrers via tag scheme:

```bash
oras discover --distribution-spec v1.1-referrers-tag localhost:5000/hello:v1
```

[Experimental] Discover referrers and display in a table view:

```bash
oras discover localhost:5000/hello:v1 --format table
```

[Experimental] Discover referrers and format output with Go template:

```bash
oras discover localhost:5000/hello:v1 --format go-template --template "{{.manifests}}"
```

Discover all the referrers of manifest with annotations, displayed in a tree view:

```bash
oras discover -v localhost:5000/hello:v1
```

Discover referrers with type 'test-artifact' of manifest 'hello:v1' in registry 'localhost:5000':

```bash
oras discover --artifact-type test-artifact localhost:5000/hello:v1
```

Discover referrers of the manifest tagged 'v1' in an OCI image layout folder 'layout-dir':

```bash
oras discover --oci-layout layout-dir:v1
```

## Options

```
      --artifact-type string                        artifact type
      --ca-file string                              server certificate authority file for the remote registry
      --cert-file string                            client certificate file for the remote registry
  -d, --debug                                       output debug logs (implies --no-tty)
      --distribution-spec string                    [Preview] set OCI distribution spec version and API option for target. Options: v1.1-referrers-tag, v1.1-referrers-api
      --format string                               [Experimental] Format output using a custom template:
                                                    'tree':         Get referrers recursively and print in tree format
                                                    'table':        Get direct referrers and output in table format
                                                    'json':         Get direct referrers and output in JSON format
                                                    'go-template':  Print direct referrers using the given Go template (default "tree")
  -H, --header stringArray                          add custom headers to requests
  -h, --help                                        help for discover
      --identity-token string                       registry identity token
      --identity-token-stdin                        read identity token from stdin
      --insecure                                    allow connections to SSL registry without certs
      --key-file string                             client private key file for the remote registry
      --no-tty                                      [Preview] do not show progress output
      --oci-layout                                  set target as an OCI image layout
  -o, --output string                               [Deprecated] format in which to display referrers (table, json, or tree). tree format will also show indirect referrers (default "tree")
  -p, --password string                             registry password or identity token
      --password-stdin                              read password from stdin
      --plain-http                                  allow insecure connections to registry without SSL check
      --platform os[/arch][/variant][:os_version]   request platform in the form of os[/arch][/variant][:os_version]
      --registry-config path                        path of the authentication file for registry
      --resolve host:port:address[:address_port]    customized DNS for registry, formatted in host:port:address[:address_port]
      --template string                             [Experimental] Template string used to format output
  -u, --username string                             registry username
  -v, --verbose                                     verbose output
```
